<div class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'west',split:true,border:false,width:'20%'">
        <div class="xy-toolbar" >
            <div class="xy-toolbar-left">组织机构</div>
        </div>
        <ul id="structureTree" style="overflow: auto;height: calc(100% - 44px)"></ul>
    </div>
    <div data-options="region:'center',border:false">

        <div class="xy-toolbar" id="umTool">
            <div class="xy-toolbar-left">权限列表
                <button class="iconfont icon-xinzeng xy-button"><span>&nbsp;&nbsp;增加</span></button>
                <button class="iconfont icon-shanchu xy-button"><span>&nbsp;&nbsp;删除</span></button>
                <button class="iconfont icon-xiugai xy-button"><span>&nbsp;&nbsp;修改</span></button>
            </div>

            <div class="xy-toolbar-right">
                <input id="select" class="easyui-combobox" name="dept"
                       data-options="valueField:'id',textField:'text',url:'get_data.php'"/>
                <button class="iconfont icon-soushuo xy-button"><span>&nbsp;&nbsp;搜索</span></button>
            </div>
        </div>
        <table id="userData"></table>
    </div>
</div>
<style>
</style>
<script type="text/javascript">
    $(function () {
        $('#userData').datagrid({
            url: '/structure/listUserByStructure', //数据接收URL地址
            pagination: true,
            pagePosition: 'bottom',
            pageSize: 10,
            pageList: [10, 20, 50],
            fit: true,
            fitColumns: false,//在表格列多的时候设置为false
            nowrap: false,	//表格内容较多时自动换行
            border: false,
            idField: 'id',
            toolbar:'#umTool',
            columns: [[
                {field: "ck", checkbox: "true"},
                {field: 'username', title: '姓名', editor: 'text', width: '20%', sortable: true},
                {field: 'sex', title: '日期', width: '20%', sortable: true},
                {field: 'sign', title: '时间', width: '20%', sortable: true},
                {field: 'experience', title: '有效否', width: '16%', sortable: true},
                {field: 'score', title: '备注', width: '20%'}
            ]],
            onLoadSuccess: function () {
//                active['checkboxChange'].call(this, $(this));

            }
        });
        $('#structureTree').tree({
            url: '/structure/structureTree',
            dnd: true,
            onClick: function (node) {
                console.info(node)
            }
        });

    })
</script>